package puzzle.projecteuler.p100;

import java.math.BigInteger;

import astudy.util.AdvMath;

public class Problem053 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		int count = 0;
		BigInteger million = BigInteger.valueOf(1000000);
		for (int m = 0; m <= 100; m ++) {
			for (int n = 0; n <= m; n ++) {
				BigInteger r = AdvMath.combine(BigInteger.valueOf(m), BigInteger.valueOf(n));
				if (r.compareTo(million) == 1) {
					count ++;
				}
			}
		}
		System.out.println(count);
	}

}
